using System;
using System.Data.Odbc;
using System.Collections.Generic;

namespace Entity {
    
	/// <summary>
	/// Cada instancia de esta clase representa un usuario.
	/// </summary>
    public class User : IEntity
	{
        private string userName;
        private string password;
        private string mail;
        private string imagePath;

        public User()
        {
            this.userName = "";
            this.password = "";
            this.mail = "";
            this.imagePath = "";
        }
        public string Username
        {
            get { return userName; }
            set { userName = value; }
        }
        public string Password
        {
            get { return password; }
            set { password = value; }
        }
        public string Email
        {
            get { return mail; }
            set { mail = value; }
        }

        public String ImagePath
        {
            get { return imagePath; }
            set { imagePath = value; }
        }
        /*
        public List<User> Followers
        {
            get { return followers; }
            set { followers = value; }
        }

        public List<User> Follows
        {
            get { return follows; }
            set { follows = value; }
        }*/
        public override bool Equals(Object obj)
        {

            bool result = false;
            if (obj is User)
            {
                User t = (User)obj;
                result = true;
                result = result && t.Username.Equals(this.Username);
                result = result && t.Password.Equals(this.password);
                result = result && t.ImagePath.Equals(this.ImagePath);
                result = result && t.Email.Equals(this.Email);
            }
            return result;
        }

        public object getId()
        {
            return Username;
        }
    }
}
